#include "Coefficients.hpp"

#include <iostream>

using namespace std;

Coefficients::Coefficients(unsigned int size)
{
	this->size = size;

	this->values = new double[size];
}

Coefficients::Coefficients(unsigned int size, double* vals)
{
	this->size = size;

	this->values = new double[size];

	for( unsigned int i=0; i<this->size; i++ )
	{
		this->values[i] = vals[i];
	}
}

Coefficients::~Coefficients()
{
	delete[] this->values;
}

int Coefficients::setCoefficient(int index, double value)
{
	this->values[index] = value;
}

int Coefficients::setCoefficients(double* values)
{
	for( unsigned int i=0; i<this->size; i++ )
        {
        	this->values[i] = values[i];
	}
}

int Coefficients::setSize(int size)
{
	this->size = size;
}

double Coefficients::getCoefficient(int index)
{
	return this->values[index];
}

int Coefficients::getSize()
{
	return this->size;
}

